<template>
  <cs-container>
    <page-header
      slot="header"
      :loading="loading"
      @submit="handleSubmit"
      ref="header"/>

    <page-main :table-data="table"/>
  </cs-container>
</template>

<script>
import { getPaymentList } from '@/api/payment/payment'

export default {
  name: 'setting-payment-config',
  components: {
    PageHeader: () => import('./components/PageHeader'),
    PageMain: () => import('./components/PageMain')
  },
  data() {
    return {
      table: [],
      loading: false
    }
  },
  mounted() {
    this.handleSubmit()
  },
  methods: {
    // 确定查询
    handleSubmit(form) {
      this.loading = true
      getPaymentList(form)
        .then(res => {
          this.table = res.data || []
        })
        .finally(() => {
          this.loading = false
        })
    }
  }
}
</script>
